#pragma once
#include<iostream>
#include<vector>
#include<list>
#include<assert.h>
#include<stdbool.h>
using namespace std;

namespace hu
{
	template<class T,class container = vector<T>>
	class stack
	{
	public:
		stack()
		{}
		stack(container A)
		{}
		~stack()
		{}

		container& operator=(container A)
		{
			*this = A;
			return *this;
		}
		void push(const T& x)
		{
			st.push_back(x);
		}

		T& top() 
		{
			return st.back();
		}

		const T& top() const
		{
			return st.back();
		}

		void pop()
		{
			st.pop_back();
		}
		const int size() const
		{
			return st.size();
		}
		bool empty() const 
		{
			return st.size() == 0;
		}
	private:
		container st;
	};

	template<class T, class container = list<T>>
	class queue
	{
	public:
		queue()
		{}
		void push(const T& x)
		{
			Q.push_back(x);
		}
		void pop()
		{
			Q.pop_front();
		}
		const T& back() const
		{
			return Q.back();
		} 
		T& back() 
		{
			return Q.back();
		}
		 const T& front() const
		 {
			return Q.front();
		 }
		 T& front() 
		 {
			 return Q.front();
		 }

		bool empty() const
		{
			return Q.size() == 0;
		}
		 const int size() const
		{
			return Q.size();
		}
	private:
		container Q;
	};

}